package cn.com.nes.mybatis.agent.ope.mapper;

import cn.com.nes.mybatis.agent.ope.entity.IsProtocolQueryCommand;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * <p>
 * 设备协议查询指令表 Mapper 接口
 * </p>
 *
 * @author nes
 * @since 2023-02-28
 */
public interface IsProtocolQueryCommandMapper extends BaseMapper<IsProtocolQueryCommand> {

    List<Map<String, Object>> getProtocolQueryCommand(Page<Map<String, Object>> page,
                                                      @Param("protocolId") String protocolId,
                                                      @Param("registerType") String registerType,
                                                      @Param("registerAddress") Integer registerAddress,
                                                      @Param("startRegisterAddress") Integer startRegisterAddress,
                                                      @Param("endRegisterAddress") Integer endRegisterAddress);

    void insertBatch(@Param("insert") Set<IsProtocolQueryCommand> insertQueryCommands);

    List<IsProtocolQueryCommand> getQueryCommand(@Param("protocolId") String protocolId, @Param("functionCode") String functionCode);
}
